1. Field of the Invention
The present application relates generally to the data processing field. More particularly the present application relates to migrating data that is subject to access by input/output devices.
2. Description of the Related Art
Reconfiguration of a computer system may be performed while the computer system is running. Doing so, however, frequently necessitates that data processing operations be disrupted. For example, if multiple operating systems are running on a computer, there may be a need to reallocate a block of memory being used by a first operating system so that it may be used by a second operating system. Traditionally, this situation has required that the first operating system stop using the block of physical memory before it is reallocated. As another example, when a problem is detected in a block of physical memory, it may be desirable to remove the memory from operation so that it can be replaced. Again, the operating system that was using the block of memory must stop using it during the replacement process.
A computer system may often be reconfigured without disrupting data processing operations by using virtual memory management mechanisms that are available in current operating systems. These mechanisms, however, are not satisfactory when the block of memory to be moved is subject to access by input/output (I/O) devices, commonly referred to as direct memory access (DMA). In particular, blocks of memory that are subject to access by I/O devices are conventionally “pinned,” that is, exempted from being moved, because access to them is maintained by essentially endless I/O programs that run as long as the operating system runs; and it would be disruptive to the system to stop such an I/O program.
It is possible to invalidate an I/O address translation entry for a block of memory (also referred to as a “page”) that is to be migrated. Then, if an I/O device were to attempt to access the page, the invalid translation entry would cause an I/O page fault to be reported and the I/O device driver would have to respond. That is, the driver would restart the I/O operation after the page again becomes available. In order for this procedure to work, however, the device drivers of all I/O devices that could possibly have access to the page would have to implement I/O page fault recovery code, which is not a practical solution.
Recognizing the inadequacies of prior mechanisms for migrating data subject to access by I/O devices, one solution involves a mechanism for migrating data in which DMA operations for I/O adapters that access the data being migrated is disabled for a short period of time. While this mechanism is effective in many applications, the industry standard PCI-E bus does not contain a mechanism for temporarily disabling DMA operations without adversely affecting other transfers to/from an I/O adapter.